package gulimall.service;

import com.fasterxml.jackson.core.JsonProcessingException;
import gulimall.pojo.vo.Cart;
import gulimall.pojo.vo.CartItemVO;

import java.util.List;
import java.util.concurrent.ExecutionException;

/**
 * 购物车相关的业务类
 *
 * @author HLF
 * @date 2022/8/12 10:56
 */
public interface CartService {
    Cart getCart();

    CartItemVO addCartItem(Long skuId, Long num) throws JsonProcessingException, ExecutionException, InterruptedException;

    CartItemVO getCartItem(Long skuId) throws JsonProcessingException;

    void checkItem(Long skuId, Integer check) throws JsonProcessingException;

    void changeItemCount(Long skuId, Long num) throws JsonProcessingException;

    void deleteItem(Long skuId) throws JsonProcessingException;

    List<CartItemVO> getCartItemVos(String cacheKey);
}

